<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        img {
            width: 200px;
            height: 200px;
        }
    </style>
</head>

<body>
    <!-- <h2>请选择年份</h2>
    <select name="" id="">
        <option value="">2018</option>
        <option value="">2</option>
        <option value="">3</option>
        <option value="">4</option>
        <option value="">5</option>
        <option value="">6</option>
        <option value="">7</option>
        <option value="">8</option>
        <option value="">9</option>
        <option value="">10</option>
        <option value="">11</option>
        <option value="">12</option>
    </select>
    <h2>请选择月份</h2>
    <select name="" id="">
        <option value="">1</option>
        <option value="">2</option>
        <option value="">3</option>
        <option value="">4</option>
        <option value="">5</option>
        <option value="">6</option>
        <option value="">7</option>
        <option value="">8</option>
        <option value="">9</option>
        <option value="">10</option>
        <option value="">11</option>
        <option value="">12</option>
    </select>
    <h2>请选择天数</h2>
    <select name="" id="">
        <option value="">1</option>
        <option value="">2</option>
        <option value="">3</option>
        <option value="">4</option>
        <option value="">5</option>
        <option value="">6</option>
        <option value="">7</option>
        <option value="">8</option>
        <option value="">9</option>
        <option value="">10</option>
        <option value="">11</option>
        <option value="">12</option>
        <option value="">13</option>
        <option value="">14</option>
        <option value="">15</option>
        <option value="">16</option>
        <option value="">17</option>
        <option value="">18</option>
        <option value="">19</option>
        <option value="">20</option>
        <option value="">21</option>
        <option value="">22</option>
        <option value="">23</option>
        <option value="">24</option>
        <option value="">25</option>
        <option value="">26</option>
        <option value="">27</option>
        <option value="">28</option>
        <option value="">29</option>
        <option value="">30</option>
        <option value="">31</option>
    </select> -->
    <img src="img/1.jpg" alt="">
    <img src="img/2.jpg" alt="">
    <img src="img/3.jpg" alt="">
    <img src="img/4.jpg" alt="">
    <img src="img/5.jpg" alt="">
    <script>

        function BigImg(opt) {
            Object.assign(this, opt);
            this.init()
        }

        BigImg.prototype = {
            constructor: BigImg,
            init: function () {
                this.create()
            },
            create: function () {
                this.mask = document.createElement("div");
                this.mask.style = `
                    width:100%;
                    height:100%;
                    position:fixed;
                    left:0;
                    top:0;
                    background:rgba(0,0,0,.3);
                `
                document.body.appendChild(this.mask)
                this.content = document.createElement("div");
                this.content.innerHTML = `
                    <input type="date">
                `;
                this.content.style = `
                    position:fixed;
                    left:50%;
                    bottom:0;
                    transform:translate(-50%,0);
                `
                document.body.appendChild(this.content)
            }
        };

        [...document.querySelectorAll("img")].forEach(function (item) {
            item.onclick = function () {
                new BigImg({
                    url: item.src
                })
            }
        })

    </script>
</body>

</html>